Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
stream-combiner
Advanced tools
The stream-combiner npm package is used to combine multiple Node.js streams (readable or writable) into a single stream. This is particularly useful for managing stream pipelines and handling data transformations in a more organized and readable manner.
Stream Pipeline Creation
This code sample demonstrates how to create a stream pipeline using stream-combiner. It combines stdin, a decryption stream, a gzip compression stream, and stdout into a single stream pipeline. Errors in any part of the stream are handled by logging to the console.
const { combine } = require('stream-combiner');
const zlib = require('zlib');
const crypto = require('crypto');
const combinedStream = combine(
process.stdin,
crypto.createDecipher('aes192', 'a_secret'),
zlib.createGzip(),
process.stdout
);
combinedStream.on('error', console.error);
Pump is a small node module that pipes streams together and destroys all of them if one of them closes. Compared to stream-combiner, pump provides a similar functionality but with a focus on properly cleaning up the streams to avoid memory leaks, which is not explicitly handled by stream-combiner.
Multistream allows you to combine multiple streams into a single readable stream. It differs from stream-combiner in that it focuses more on sequential rather than parallel stream combination, making it suitable for scenarios where streams need to be processed one after another.
<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>
Turn a pipeline into a single stream. pipeline
returns a stream that writes to the first stream
and reads from the last stream.
Listening for 'error' will recieve errors from all streams inside the pipe.
var Combine = require('stream-combiner')
var es = require('event-stream')
Combine( //connect streams together with `pipe`
process.openStdin(), //open stdin
es.split(), //split stream to break on newlines
es.map(function (data, callback) {//turn this async function into a stream
callback(null
, inspect(JSON.parse(data))) //render it nicely
}),
process.stdout // pipe it to stdout !
)
MIT
FAQs
[![npm version](https://img.shields.io/npm/v/stream-combiner.svg)](https://npmjs.org/package/stream-combiner) [![Travis CI](https://travis-ci.org/dominictarr/stream-combiner.svg)](https://travis-ci.org/dominictarr/stream-combiner)
The npm package stream-combiner receives a total of 2,953,065 weekly downloads. As such, stream-combiner popularity was classified as popular.
We found that stream-combiner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.